import http from '@/config/http'
import store from '@/store';
// // https://h5-api.huoassetm.com/swagger-ui/index.html#/common-controller/getAllSettingUsingPOST
export function getAllSetting(data) {
	return http.post('/api/common/getAllSetting', data, {
		custom: {
			loading: true
		}
	})
}
// /api/user/easyGenerateCode
export function easyGenerateCode(data) {
	return http.get('/api/user/easyGenerateCode', data, {

	})
}
//发送验证码
export function sendEmailCode(data) {
	return http.post('/api/user/sendEmailCode', data, {

	})
}

//语言列表
export function getLanguage(data) {
	return http.get('/api/common/getLanguage', data, {
		custom: {
			loading: true
		}
	})
}
//用户信息

export function getUserInfo(data) {
	return http.post('/api/user/getInfo', data, {
		custom: {
			loading: false
		}
	})
}
//首页图片区域/api/financial/list/ isHot 传 1
export function financiallist(data) {
	return http.get('/api/financial/list', data, {
		custom: {
			loading: true
		}
	})
}
//首页轮播

export function getAllNoticeList(data) {
	return http.post('/api/notice/getAllNoticeList', data, {
		custom: {
			loading: true
		}
	})
}

///api/homeSetter/list
export function homeSetterlist(data) {
	return http.get('/api/homeSetter/list', data, {
		custom: {
			loading: true
		}
	})
}

///api/financial/id post 理财详情
export function financialDetail(data) {
	return http.post(`/api/financial/${data.id}`, data, {
		custom: {
			loading: true
		}
	})
}
///api/financial/typeList  类型接口
export function typeList(data) {
	return http.get(`/api/financial/typeList`, data, {
		custom: {
			loading: true
		}
	})
}

//认购提交
export function financialsubmit(data) {
	return http.post(`/api/financial/submit`, data, {
		custom: {
			loading: true
		}
	})
}

//公告详情
export function homeSetterId(data) {
	return http.get(`/api/homeSetter/${data}`, data, {
		custom: {
			loading: true
		}
	})
}
//财务明细  /api/record/list  get请求 传userId   
export function recordList(data) {
	return http.get(`/api/record/list`, data, {
		custom: {
			loading: true
		}
	})
}

// 我的投资 /api/order/list   post  传userId  
export function myOrderList(data) {
	return http.get(`/api/order/list`, data, {
		custom: {
			loading: true
		}
	})
}
//银行卡/api/userBank/getbank  post   
export function userBankgetbank(data) {
	return http.post(`/api/userBank/getbank`, data, {
		custom: {
			loading: true
		}
	})
}
//提现记录 /api/widthdraw/list  post
export function widthdrawlist(data) {
	return http.get(`/api/widthdraw/list`, data, {
		custom: {
			loading: true
		}
	})
}

//新增银行卡
export function addUserBank(data) {
	return http.post(`/api/userBank/save`, data, {
		custom: {
			loading: true
		}
	})
}
//实名认证
export function uploadKYC(data) {
	return http.post(`/api/user/uploadKYC`, data, {
		custom: {
			loading: true
		}
	})
}
//设置资金密码
export function tardPwdSet(data) {
	return http.post(`/api/user/tardPwdSet`, data, {
		custom: {
			loading: true
		}
	})
}
//修改资金密码
export function updatePwd(data) {
	return http.post(`/api/user/updatePwd`, data, {
		custom: {
			loading: true
		}
	})
}
//充值提交
export function rechargeSubmit(data) {
	return http.post(`/api/recharge/submit`, data, {
		custom: {
			loading: true
		}
	})
}
//  提现  BigDecimal amount, String coinType, String pwd, String address
export function widthdrawSubmit(data) {
	return http.post(`/api/widthdraw/submit`, data, {
		custom: {
			loading: true
		}
	})
}
//我的团队

export function getAgentList(data) {
	return http.post(`/api/agentActivityInfo/getAgentList`, data, {
		custom: {
			loading: true
		}
	})
}
// /api/financial/personalIncome 接口 post 无参数
export function personalIncome(data) {
	return http.post(`/api/financial/personalIncome`, data, {
		custom: {
			loading: true
		}
	})
}
//修改登录密码/api/user/updatePwdByEmail
export function updatePwdByEmail(data) {
	return http.post(`/api/user/updatePwdByEmail`, data, {
		custom: {
			loading: true
		}
	})
}
// 参数 String   lang  lang传当前语言，String key  key传 16
export function optionrules(data) {
	return http.get(`/api/option/rules/list`, data, {
		custom: {
			loading: true
		}
	})
}
//帮助中心
export function helpcenterlist(data) {
	return http.post(`/api/helpcenter/list`, data, {
		custom: {
			loading: true
		}
	})
}
//会员等级
export function levelList(data) {
	return http.get(`/api/user/levelList`, data, {
		custom: {
			loading: true
		}
	})
}